/**
 * MarioEnemy_RedTurtleAI
 * @extends MarioAI
 * @version 2010.12.04
 */

class MarioEnemy_RedTurtleAI extends MarioAI;

state Patrolling
{
	/**
	 * SeePlayer
	 * @version 2010.12.04
	 */
	event SeePlayer(Pawn SeenPlayer)
	{
		if(PlayerController(SeenPlayer.Controller) == None)
			return;

		thePlayer = SeenPlayer;
	}

	Begin:
	Pawn.MaxDesiredSpeed = 0.3;

	//Negate this if and remove the else?
	if(Pawn.Health <= 50 && Pawn.Health > 10)
	{
		Pawn.MaxDesiredSpeed = 200.0f;
	}
	else
		MoveToward(thePlayer, thePlayer);
	//`log("Player X:"$thePlayer.Location.X$" Y:"$thePlayer.Location.Y$" Z:"$thePlayer.Location.Z);
	//`log("Enemy X:"$Pawn.Location.X$" Y:"$Pawn.Location.Y$" Z:"$Pawn.Location.Z);
	LatentWhatToDoNext();
}


